home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-06-01 | 1.9 KB | 99 lines | [TEXT/KAHL] |
- %!
-
-
- /strcat % string1 string2 -> newString
- {
- dup length 3 -1 roll dup length % s2 l2 s1 l1
- dup 4 -1 roll add string dup % s2 s1 l1 ns ns
- 4 -1 roll 0 exch putinterval % s2 l1 ns
- dup 4 1 roll exch 3 -1 roll % ns ns l1 s2
- putinterval % ns
- } def
-
-
- % Check the Mac GUI revision.
-
- 2523
- dup .macGSversion ne
- {
- (MacGS GUI revision \() .macGSversion 10 string cvs strcat
- (\) does not match gs_mac.ps revision \() strcat exch 10 string cvs strcat
- (\).) strcat .macalert pop
- 1 .quit
- } if pop
-
-
- /.macshowpage where
- {
- pop
- }
- {
- /.macshowpage /showpage load def % original definition
-
- /.domacshowpage 0 def % use original or spoof
-
- /showpage % Mac showpage
- {
- [
- % case 0
- {
- .macshowpage % use original showpage (non-Mac device driver)
- }
- % case 1
- {
- #copies true .outputpage
- (>>> showpage, select Resume from MacGS menu to continue <<<\n)
- print flush
- .macconfirm erasepage initgraphics not {stop} if
- }
- % case 2
- {
- #copies true .outputpage erasepage initgraphics
- % do not pause for automatic printing
- }
- ]
- .domacshowpage get exec
- } def
-
- } ifelse
-
-
- /.macrunfile
- {
- .macopenfile
- {
- userdict /.macRunFile 3 -1 roll put
-
- count array astore userdict /.macOperStack 3 -1 roll store % save operands
- userdict /.macDictStack countdictstack array dictstack store % save dicts
-
- erasepage gsave userdict /.macRunFile get cvx execute grestore initgraphics
-
- clear userdict /.macOperStack get aload pop % restore operand stack
-
- countdictstack 3 sub 0 1 3 -1 roll % close non-standard dicts
- {
- pop end
- } for
-
- 2 1 userdict /.macDictStack get length 1 sub % re-open non-standard dicts
- {
- userdict /.macDictStack get get begin
- } for
- } if
- } def
-
-
- /.maclaserprep
- {
- {(laserprep_68.pro) run} execute
- } def
-
-
- /.macsetdevice
- {
- getdevice
- dup devicename (...Using device “) print print (”...\n) print flush
- setdevice
- } def
-